/*
 * Copyright (C) 拾光分享网 
 * All rights reserved, Designed By www.hiai.top.
 * Email：goodsking@163.com.
 * Version：V1.0.2(20230701).
 */
package top.hiai.config;

import com.jfinal.config.Routes;

import top.hiai.common.upload.UploadController;
import top.hiai.download.DownloadController;
import top.hiai.index.IndexController;
import top.hiai.login.LoginController;
import top.hiai.my.article.MyArticleController;
import top.hiai.my.favorite.MyFavoriteController;
import top.hiai.my.index.IndexMyController;
import top.hiai.my.information.InformationController;
import top.hiai.my.setting.MySettingController;
import top.hiai.search.SearchController;
import top.hiai.topic.TopIcController;
import top.hiai.user.index.IndexUserController;

/**
* @Author www.hiai.top
* @Email  goodsking@163.com
* @Message 更多资源尽在www.hiai.top
* @Introduction 类的介绍 前端路由
*/

public class FrontRoutes extends Routes {

    @Override
    public void config() {
    	setBaseViewPath("/_view");
       
    	/*前台控制器*/
        add("/", IndexController.class, "/index");
        add("/search", SearchController.class, "/index");
        add("/topic", TopIcController.class, "/topic");
        add("/login", LoginController.class, "/login");
        add("/common/upload", UploadController.class);
        add("/download", DownloadController.class, "/download");
        
        /*用户控件控制器，不需要登录*/
        add("/user", IndexUserController.class, "/user");
        
        /*个人空间控件控制器，需要登录*/
        add("/my", IndexMyController.class, "/my");
        add("/my/setting", MySettingController.class, "/my/setting");
        add("/my/article", MyArticleController.class, "/my/article");
        add("/my/favorite", MyFavoriteController.class,"/my/favorite");
        add("/my/msg", InformationController.class,"/my/msg");
    }
}